package com.speed.realm;

import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.subject.PrincipalCollection;

import com.jfinal.kit.StrKit;

/**
 * 等级会员制度
 * 
 * @author zcj
 *
 */
public class AccountRealm extends AuthorizingRealm {

	// 活动名称+会员等级名称 {降价促销:R1,R2;积分商品 :R3,R4}
	private String activityNamesAndAccountName;

	public String getActivityNames() {
		return activityNamesAndAccountName;
	}

	public void setActivityNames(String _activityNamesAndAccountName) {
		this.activityNamesAndAccountName = _activityNamesAndAccountName;
	}

	private void getPermisstions() {
		if (StrKit.notBlank(activityNamesAndAccountName)) {

		}
	}

	/**
	 * 权限验证
	 */
	@Override
	protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {

		return null;
	}

	/**
	 * 身份验证
	 */
	@Override
	protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException {
		return null;
	}

}
